package com.study.mike.common.utils;

import cn.hutool.core.util.RandomUtil;
import com.study.mike.model.entity.Book;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author KangHui
 * @Date 2022/8/4 10:31
 */
public class BookUtil {

    public static Book generateBook() {
        Book book = new Book();
        book.setBookAuthor(EncryptUtils.aesEncrypt("author" + RandomUtil.randomString(3)));
        book.setBookName("文化典章");
        book.setBookNo(EncryptUtils.aesEncrypt("bn" + RandomUtil.randomString(8)));
        book.setBookPrice(new BigDecimal(20.25));
        book.setBookTime(new Date());
        return book;
    }
}
